/*转换java中的date时间格式*/
function getDate(strDate) {
 
            var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
 
             function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) + ')');
 
            return formatDate(date);
 
        }
function formatDate(date) {  
    var y = date.getFullYear();  
    var m = date.getMonth() + 1;  
    m = m < 10 ? '0' + m : m;  
    var d = date.getDate();  
    d = d < 10 ? ('0' + d) : d; 
   var h=date.getHours();
   var mi=date.getMinutes();
   var s=date.getSeconds();
    return y + '-' + m + '-' + d+" "+h+":"+mi+":"+s;  
}; 
/*手机号码验证*/
function checkPhone(phone){
	var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; 

	if(!myreg.test(phone)) 
	{ 
	    return false; 
	} 
	return true;
}
/*json数据长度获取*/
function getJsonObjLength(jsonObj) {
    var Length = 0;
    for (var item in jsonObj) {
        Length++;
   }
    return Length;
}


var commenUtil={
		  createWindow : function(params){
		    	$("<div>").css({padding:"5px"}).window({
		    		width : params.width?params.width:"80%",
		    		height : params.height?params.height:"80%",
		    		modal:true,
		    		title : params.title?params.title:" ",
		    		href : params.url,
				    onClose : function(){
				    	$(this).window("destroy");
				    },
				    onLoad : function(){
				    	if(params.onLoad){
				    		params.onLoad.call(this);
				    	}
				    }
		    	});
		    },
}